﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="SearchGarage.aspx.cs" Async="true" Inherits="carinsurance_garage_SearchGarage"
    ValidateRequest="false" EnableEventValidation="true" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content3" ContentPlaceHolderID="cphPageTitle" runat="Server">
    <h1>
        <asp:Label runat="server" Text="<%$Resources:General,GarageList%>" ID="lblPageName"></asp:Label></h1>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label runat="server" Text="<%$Resources:General,LangOption%>" Visible="false"
        ID="lblLangOption" />
    <asp:HyperLink runat="server" Visible="false" ID="lnkNewCarUsage" NavigateUrl="#"
        Text="New"></asp:HyperLink>
    <div class="bc2">
        <asp:Label runat="server" ID="lblSiteLocation" Text="You are here : " CssClass="bclist" />
        <asp:SiteMapPath SiteMapProvider="SiteUserSiteMapProvider" ID="smpProvider" runat="server"
            PathSeparator=" : ">
            <PathSeparatorStyle CssClass="bcarrow" />
            <CurrentNodeStyle CssClass="bclist" />
            <NodeStyle CssClass="bclink" />
            <RootNodeStyle CssClass="bclink" />
        </asp:SiteMapPath>
        <div class="clear">
        </div>
    </div>
    <div class="topdisplay pb10">
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <asp:Panel ID="pnlSearch" runat="server">
                <tr style="display: none;">
                    <td width="115">
                        <label>
                            <%=GetGlobalResourceObject("CarInsurance", "ReferenceNo")%>
                            :
                        </label>
                    </td>
                    <td width="150">
                        <asp:TextBox ID="txtSearch" runat="server" Width="150px" ToolTip="<%$Resources:General,SearchbyReferenceNo%>"
                            MaxLength="20" />
                    </td>
                    <td colspan="2">
                        <asp:Button runat="server" ID="btnAppSummary" Text="<%$Resources:General,ApplicationFormSummary%>"
                            OnClick="btnAppSummary_Click" CssClass="blueB ml10" />
                        <asp:Label runat="server" ID="lblSearchMessage" Text="" ForeColor="Red" />&nbsp;&nbsp;
                        <asp:RequiredFieldValidator runat="server" ID="rfvSearch" ControlToValidate="txtSearch"
                            ErrorMessage="<%$Resources:General,EnterValidQuoteRefNo%>" Text="<%$Resources:General,EnterValidQuoteRefNo%>"
                            Display="Dynamic" ValidationGroup="search"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <label>
                            <%=GetGlobalResourceObject("Garage", "SearchWord")%>
                        </label>
                    </td>
                </tr>
                <tr>
                    <td width="115">
                        <label>
                            <%=GetGlobalResourceObject("Garage", "Keyword")%>
                            :</label>
                    </td>
                    <td width="150" colspan="3">
                        <asp:TextBox ID="txtGarageSearch" runat="server" Width="350px" ToolTip="<%$Resources:General,SearchbyReferenceNo%>"
                            MaxLength="200" />
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:General,Search%>" ValidationGroup="search"
                            OnClick="btnSearch_Click" CssClass="blueB ml10" OnClientClick="return SubmitSearchConfirm();"
                            Width="150px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <label>
                            <%=GetGlobalResourceObject("Garage", "Options")%></label>
                    </td>
                </tr>
                <tr>
                    <td width="150px">
                        <label>
                            <%=GetGlobalResourceObject("Garage", "InsuranceCompany")%>
                            :</label>
                    </td>
                    <td width="200px">
                        <asp:DropDownList ID="ddlBrokerProvider" runat="server" Width="180px">
                        </asp:DropDownList>
                    </td>
                    <td width="115px">
                        <label>
                            <%=GetGlobalResourceObject("Garage", "Region")%>
                            :</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlRegion" runat="server" Width="160px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label>
                            <%=GetGlobalResourceObject("CarInsurance", "GarageType")%>
                            :</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlGarageType" runat="server" Width="180px">
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label>
                            <%=GetGlobalResourceObject("Garage", "Province")%>
                            :</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlProvinceRegistration" Width="160px" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlProvinceRegistration_SelectedIndexChanged">
                            <asp:ListItem Text="<%$ Resources:General,Select%>" Value="-1" />
                            <asp:ListItem Text="<%$ Resources:Proposal,Province_BKK%>" Value="BKK" />
                            <asp:ListItem Text="<%$ Resources:Proposal,Province_UPC%>" Value="UPC" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label>
                            <%=GetGlobalResourceObject("CarInsurance", "CarMake")%>
                            :</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlCarMake" runat="server" Width="180px">                         
                        </asp:DropDownList>
                    </td>
                    <td>
                        <label>
                            <%=GetGlobalResourceObject("Garage", "District")%>
                            :</label>
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlDistrict" runat="server" Width="160px">
                        <asp:ListItem Text="<%$ Resources:General,Select%>" Value="-1" />
                        </asp:DropDownList>
                    </td>
                </tr>
            </asp:Panel>
        </table>
    </div>
    <div id="divCar" class="toggle" runat="server" visible="false">
        <div class="title opened" id="opened1">
            <img src="../../images/icons/dark/imagesList.png" alt="" class="titleIcon" />
            <h6>
                <asp:Label ID="lblLastCallStatusCaption" runat="server" Text="<%$Resources:General,UpdateMoreDetails%>" />
                <asp:Label ID="lblLastCallStatusMessage" runat="server" Text="" ForeColor="Red" />
            </h6>
        </div>
        <div class="form">
            <fieldset class="step">
                <asp:UpdatePanel ID="upnlDetails" runat="server">
                    <ContentTemplate>
                        <asp:Panel ID="pnlDetails" runat="server">
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label6" Text="<%$Resources:General,ReferenceNo%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpRefNo" runat="server"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label2" Text="<%$Resources:General,ApplicantName%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpApplicantName" runat="server"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label3" Text="<%$Resources:General,InsuranceCompany%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpInsurer" runat="server"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label4" Text="<%$Resources:General,PlanName%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpPlanName" runat="server"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label5" Text="<%$Resources:General,Premium%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpPremium" runat="server"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow" style="display: none;">
                                <asp:Label runat="server" ID="Label60" Text="<%$Resources:General,PaymentType%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpPaymentType" runat="server" Font-Bold="true"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label7" Text="<%$Resources:General,PaymentStatus%>" />
                                <div class="formRight">
                                    <asp:Label ID="lblUpPaymentStatus" runat="server" Font-Bold="true"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label8" Font-Bold="true" CssClass="green" Text="<%$Resources:Carinsurance,SelectOption%>" />
                                <div class="formRight">
                                    <asp:DropDownList ID="ddlOption" runat="server" Width="200px" AutoPostBack="true"
                                        OnSelectedIndexChanged="ddlOption_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                                        <asp:ListItem Value="EDIT" Text="<%$ Resources:CarInsurance,MoreDetails%>"></asp:ListItem>
                                        <asp:ListItem Value="PAYM" Text="<%$ Resources:CarInsurance,Payment%>"></asp:ListItem>
                                        <asp:ListItem Value="UPLD" Text="<%$ Resources:CarInsurance,UploadFile%>"></asp:ListItem>
                                        <asp:ListItem Value="ACNL" Text="<%$ Resources:CarInsurance,CancelRejectApplication%>"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Label runat="server" ID="lblLoadMessage" Font-Bold="true" ForeColor="Red" Text="" />
                                    <br />
                                    <asp:Label ID="lblRenewalMessage" Font-Bold="true" ForeColor="Red" runat="server"></asp:Label>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </fieldset>
        </div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlOptionMessage" runat="server" Visible="false">
                <h5 class="mt10">
                    <asp:Label ID="lblOptionMessage" runat="server" CssClass="green"></asp:Label></h5>
                <asp:Label ID="lblOptionError" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label>
            </asp:Panel>
            <div style="display: none;">
                <asp:Label ID="lblNonGGStatus" runat="server" Text="0"></asp:Label>
                <asp:TextBox ID="txtLastYearCarId" runat="server" Text="0"></asp:TextBox>
                <asp:Label ID="lblLastYearRefNo" runat="server"></asp:Label>
                <asp:Label ID="lblLastYearPolicyNo" runat="server"></asp:Label>
                <asp:Label ID="lblAgentId" runat="server" Text="0"></asp:Label>
                <asp:Label ID="lblAdminId" runat="server" Text="0"></asp:Label>
                <asp:Label ID="lblCompanyStaff" runat="server" Text="0"></asp:Label>
                <asp:TextBox ID="txtCarId" runat="server"></asp:TextBox>
                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtProviderId" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtUserId" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtOrderRefNo" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtSubmitedAgentId" runat="server" Text="0"></asp:TextBox>
                <asp:TextBox ID="txtSubmitedType" runat="server" Text="0"></asp:TextBox>
                <asp:TextBox ID="txtLastStep" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtLastQuoteRefNo" runat="server"></asp:TextBox>
                <asp:TextBox ID="txtCancelStatus" runat="server" Text="0"></asp:TextBox>
                <asp:TextBox ID="txtDriverId1" runat="server" Text="0"></asp:TextBox>
                <asp:TextBox ID="txtDriverId2" runat="server" Text="0"></asp:TextBox>
                <asp:TextBox ID="txtApproveStatus" CausesValidation="false" runat="server" Text="0"></asp:TextBox>
                <asp:Label ID="lblMailingStatus" CausesValidation="false" Text="0" runat="server"></asp:Label>
                <asp:TextBox ID="txtAppStatus" CausesValidation="false" runat="server" Text="OFFLINE"></asp:TextBox>
                <asp:TextBox ID="txtStatus" CausesValidation="false" runat="server" Text="TRUE"></asp:TextBox>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="upnlPayment" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlPayment" runat="server" Visible="false">
                <div class="toggle" id="divPayList" runat="server" visible="false">
                    <div class="title opened" id="opened2">
                        <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                        <h6>
                            <asp:Label ID="Label29" CssClass="blue" runat="server" Text="<%$Resources:General,PaymentList %>"></asp:Label>
                        </h6>
                    </div>
                    <asp:GridView ID="grvPayment" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                        Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>" CssClass="sTable"
                        GridLines="None" DataKeyNames="PaymentId,PaymentOptionId,PaymentTypeId,TransactionType,ApproveType,CardHolder,IssuingBank,CardExpiryMonth,CardExpiryYear,CardType,CVV,PaymentRefNo,Status"
                        OnSelectedIndexChanged="grvPayment_SelectedIndexChanged" OnRowDataBound="grvPayment_RowDataBound">
                        <Columns>
                            <asp:BoundField DataField="PaymentId" HeaderText="PaymentId" SortExpression="PaymentId"
                                Visible="false" />
                            <asp:BoundField DataField="PaymentType" HeaderText="<%$Resources:CarInsurance,PaymentType%>"
                                SortExpression="PaymentType" ItemStyle-Width="150px" />
                            <asp:BoundField DataField="CreditCardNo" HeaderText="<%$Resources:CarInsurance,CreditCardNo%>"
                                SortExpression="CreditCardNo" ItemStyle-Width="150px" />
                            <asp:BoundField DataField="CollectedAmount" HeaderText="<%$Resources:CarInsurance,Amount%>"
                                SortExpression="CollectedAmount" ItemStyle-Width="100px" />
                            <asp:BoundField DataField="Transaction" HeaderText="<%$Resources:General,PaymentStatus%>"
                                SortExpression="Transaction" ItemStyle-Width="100px" />
                            <asp:BoundField DataField="ModifiedDate" ItemStyle-Width="140px" HeaderText="Date/Time"
                                SortExpression="ModifiedDate" Visible="true" DataFormatString="{0:dd/MMM/yyyy hh:mm tt}" />
                            <asp:BoundField DataField="AgentName" ItemStyle-Width="150px" HeaderText="<%$Resources:General,Broker%>"
                                SortExpression="AgentName" Visible="true" />
                            <asp:BoundField DataField="Approval" HeaderText="<%$Resources:CarInsurance,Approve%>"
                                SortExpression="Approval" ItemStyle-Width="100px" />
                            <asp:CommandField Visible="true" ButtonType="Button" ControlStyle-CssClass="blueB ml10"
                                ItemStyle-HorizontalAlign="Center" HeaderText="<%$Resources:CarInsurance,Select%>"
                                SelectText="<%$Resources:CarInsurance,Approve%>" ShowSelectButton="true" />
                            <asp:BoundField DataField="CardHolder" HeaderText="CardHolder" SortExpression="CardHolder"
                                Visible="false" />
                            <asp:BoundField DataField="IssuingBank" HeaderText="IssuingBank" SortExpression="IssuingBank"
                                Visible="false" />
                            <asp:BoundField DataField="CardExpiryMonth" HeaderText="CardExpiryMonth" SortExpression="CardExpiryMonth"
                                Visible="false" />
                            <asp:BoundField DataField="CardExpiryYear" HeaderText="CardExpiryYear" SortExpression="CardExpiryYear"
                                Visible="false" />
                            <asp:BoundField DataField="CardType" HeaderText="CardType" SortExpression="CardType"
                                Visible="false" />
                            <asp:BoundField DataField="CVV" HeaderText="CVV" SortExpression="CVV" Visible="false" />
                            <asp:BoundField DataField="ApproveType" HeaderText="ApproveType" SortExpression="ApproveType"
                                Visible="false" />
                            <asp:BoundField DataField="IsOnlinePayment" HeaderText="IsOnlinePayment" SortExpression="IsOnlinePayment"
                                Visible="false" />
                        </Columns>
                        <FooterStyle />
                        <PagerStyle />
                        <SelectedRowStyle />
                        <HeaderStyle />
                        <EditRowStyle />
                        <AlternatingRowStyle />
                        <RowStyle />
                    </asp:GridView>
                </div>
                <asp:Panel ID="pnlOnlinePayment" runat="server" Visible="false">
                    <div class="toggle">
                        <div class="title opened" id="opened8">
                            <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                            <h6>
                                <asp:Label ID="Label14" CssClass="blue" runat="server" Text="<%$Resources:General,OnlinePaymentDetail %>"></asp:Label>
                            </h6>
                        </div>
                        <div class="formRow">
                            <div>
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td style="width: 200px;">
                                            <asp:Label runat="server" ID="Label125" Text="<%$Resources:CarInsurance,PaymentType%>" />
                                            <asp:TextBox ID="txtOnlinePaymentType" runat="server" MaxLength="25" Width="100px"
                                                ReadOnly="true" Text="0" Font-Bold="true"></asp:TextBox>
                                        </td>
                                        <td style="width: 180px;">
                                            <asp:Label runat="server" ID="Label131" Text="<%$Resources:CarInsurance,Amount%>" />
                                            <asp:TextBox ID="txtOnlineAmount" runat="server" MaxLength="15" Width="100px" ReadOnly="true"
                                                Text="0" Font-Bold="true"></asp:TextBox>
                                        </td>
                                        <td style="width: 250px;">
                                            <asp:Label runat="server" ID="Label132" Text="<%$Resources:CarInsurance,PaymentRefNo%>" />
                                            <asp:TextBox ID="txtOnlinePaymentRefNo" runat="server" MaxLength="25" Width="150px"></asp:TextBox>
                                            <asp:RequiredFieldValidator runat="server" ID="rfvOnlinePaymentRefNo" ControlToValidate="txtOnlinePaymentRefNo"
                                                ErrorMessage="" Text="<%$Resources:General,EnterValidPaymentRefNo%>" ValidationGroup="olpay"
                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnOnlinePaySubmit" runat="server" CausesValidation="true" Text="<%$Resources:CarInsurance,Approve%>"
                                                ValidationGroup="olpay" CssClass="blueB ml10" OnClick="btnOnlinePaySubmit_Click"
                                                OnClientClick="return SubmitOnlinePayConfirm();" />
                                            <asp:Button ID="btnOnlinePayDecline" runat="server" CausesValidation="true" Text="<%$Resources:General,Decline%>"
                                                CssClass="blueB ml10" OnClick="btnOnlinePayDecline_Click" OnClientClick="return SubmitOnlinePayDeclineConfirm();" />
                                            <asp:Label ID="lblOnlinePayError" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </asp:Panel>
                <div style="display: none;">
                    <asp:TextBox ID="txtPaymentId" runat="server" Text="0"></asp:TextBox>
                    <asp:TextBox ID="txtOnlineApproveStatus" runat="server" Text="0"></asp:TextBox>
                </div>
                <asp:Panel ID="pnlPaymentInput" runat="server">
                    <div class="toggle">
                        <div class="title opened" id="opened4">
                            <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                            <h6>
                                <asp:Label ID="Label1" CssClass="red" runat="server" Text="<%$Resources:CarInsurance,Payment %>"></asp:Label>
                            </h6>
                        </div>
                        <div class="form">
                            <fieldset class="step">
                                <div class="formRow">
                                    <div>
                                        <table cellpadding="0" cellspacing="0" border="0" width="75%">
                                            <tr>
                                                <td style="width: 250px;">
                                                    <asp:Label runat="server" ID="Label25" Text="<%$Resources:CarInsurance,CollectedAmount%>" />
                                                    <asp:TextBox ID="txtTotalCollectedAmount" runat="server" MaxLength="15" Width="120px"
                                                        ReadOnly="true" Text="0"></asp:TextBox>
                                                </td>
                                                <td style="width: 250px;">
                                                    <asp:Label runat="server" ID="Label31" Text="<%$Resources:CarInsurance,RefundAmount%>" />
                                                    <asp:TextBox ID="txtTotalRefundAmount" runat="server" MaxLength="15" Width="120px"
                                                        ReadOnly="true" Text="0"></asp:TextBox>
                                                </td>
                                                <td style="width: 250px;">
                                                    <asp:Label runat="server" ID="Label32" Text="<%$Resources:CarInsurance,BalanceAmount%>" />
                                                    <asp:TextBox ID="txtBalanceAmount" runat="server" MaxLength="15" Width="120px" ReadOnly="true"
                                                        Text="0"></asp:TextBox>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div class="formRow">
                                    <asp:Label runat="server" ID="Label13" Text="<%$Resources:General,ReferenceNo%>" />
                                    <div class="formRight">
                                        <asp:Label ID="lblPRefNo" runat="server"></asp:Label>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="formRow">
                                    <asp:Label runat="server" ID="Label21" Text="<%$Resources:General,PaymentStatus%>" />
                                    <div class="formRight">
                                        <asp:CheckBox ID="chkRefund" onclick="CheckPaymentType();" runat="server" Text="<%$Resources:CarInsurance,Refund%>" />
                                        <asp:CheckBox ID="chkApprove" runat="server" Text="<%$Resources:CarInsurance,Approve%>" />
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div style="display: " id="divCredit">
                                    <div class="formRow">
                                        <asp:Label runat="server" ID="Label19" Text="<%$Resources:CarInsurance,PaymentOption%>" />
                                        <div class="formRight">
                                            <asp:DropDownList ID="ddlPaymentOption" runat="server" Width="200px" AutoPostBack="true"
                                                OnSelectedIndexChanged="ddlPaymentOption_SelectedIndexChanged">
                                                <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                                                
                                                <asp:ListItem Value="FP" Text="<%$ Resources:CarInsurance,AnnualPayment%>"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="rfvPaymentOption" ControlToValidate="ddlPaymentOption"
                                                ErrorMessage="" ValidationGroup="pay" InitialValue="-1" Text="*" runat="server"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                    <div class="formRow">
                                        <asp:Label runat="server" ID="Label9" Text="<%$Resources:CarInsurance,PaymentType%>" />
                                        <div class="formRight">
                                            <asp:DropDownList ID="ddlPaymentType" runat="server" Width="200px" AutoPostBack="true"
                                                OnSelectedIndexChanged="ddlPaymentType_SelectedIndexChanged">
                                                <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                                                <asp:ListItem Value="CASH" Text="<%$ Resources:CarInsurance,Cash%>"></asp:ListItem>
                                                <asp:ListItem Value="BKTR" Text="<%$ Resources:CarInsurance,BankIn%>"></asp:ListItem>
                                                <asp:ListItem Value="CCIP" Text="<%$ Resources:CarInsurance,CreditcardiPay%>"></asp:ListItem>
                                                <asp:ListItem Value="CCOL" Text="<%$ Resources:CarInsurance,CreditcardOnline%>"></asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:RequiredFieldValidator ID="rfvPaymentType" ControlToValidate="ddlPaymentType"
                                                ErrorMessage="" ValidationGroup="pay" InitialValue="-1" Text="*" runat="server"></asp:RequiredFieldValidator>
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                    <asp:Panel ID="pnlCreditCard" runat="server" Visible="false">
                                        <div class="formRow">
                                            <asp:Label runat="server" ID="Label18" Text="<%$Resources:CarInsurance,Cardholder%>" />
                                            <div class="formRight">
                                                <asp:TextBox ID="txtCardHolder" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="rfvCardHolder" ControlToValidate="txtCardHolder"
                                                    ErrorMessage="" Text="*" ValidationGroup="pay"></asp:RequiredFieldValidator>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="formRow">
                                            <asp:Label runat="server" ID="Label22" Text="<%$Resources:CarInsurance,IssuingBank%>" />
                                            <div class="formRight">
                                                <asp:TextBox ID="txtIssuingBank" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                                <asp:RequiredFieldValidator runat="server" ID="rfvIssuingBank" ControlToValidate="txtIssuingBank"
                                                    ErrorMessage="" Text="*" ValidationGroup="pay"></asp:RequiredFieldValidator>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="formRow">
                                            <asp:Label runat="server" ID="Label11" Text="<%$Resources:CarInsurance,CreditCardNo%>" />
                                            <div class="formRight">
                                                <asp:TextBox ID="txtCardNo1" runat="server" MaxLength="4" Width="40px"></asp:TextBox>
                                                <asp:TextBox ID="txtCardNo2" runat="server" MaxLength="4" Width="40px"></asp:TextBox>
                                                <asp:TextBox ID="txtCardNo3" runat="server" MaxLength="4" Width="40px"></asp:TextBox>
                                                <asp:TextBox ID="txtCardNo4" runat="server" MaxLength="4" Width="40px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvCardNo1" ControlToValidate="txtCardNo1" ErrorMessage=""
                                                    ValidationGroup="pay" runat="server" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="revCardNo1" runat="server" ErrorMessage="" ValidationGroup="pay"
                                                    ValidationExpression="[0-9]{4}" ControlToValidate="txtCardNo1" Text="*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                <asp:RequiredFieldValidator ID="rfvCardNo2" ControlToValidate="txtCardNo2" ErrorMessage=""
                                                    ValidationGroup="pay" runat="server" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="revCardNo2" runat="server" ErrorMessage="" ValidationGroup="pay"
                                                    ValidationExpression="[0-9]{4}" ControlToValidate="txtCardNo2" Text="*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                <asp:RequiredFieldValidator ID="rfvCardNo3" ControlToValidate="txtCardNo3" ErrorMessage=""
                                                    ValidationGroup="pay" runat="server" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="revCardNo3" runat="server" ErrorMessage="" ValidationGroup="pay"
                                                    ValidationExpression="[0-9]{4}" ControlToValidate="txtCardNo3" Text="*" Display="Dynamic"></asp:RegularExpressionValidator>
                                                <asp:RequiredFieldValidator ID="rfvCardNo4" ControlToValidate="txtCardNo4" ErrorMessage=""
                                                    ValidationGroup="pay" runat="server" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="revCardNo4" runat="server" ErrorMessage="" ValidationGroup="pay"
                                                    ValidationExpression="[0-9]{4}" ControlToValidate="txtCardNo4" Text="*" Display="Dynamic"></asp:RegularExpressionValidator>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="formRow">
                                            <asp:Label runat="server" ID="Label16" Text="<%$Resources:CarInsurance,CardExpiryDate%>" />
                                            <div class="formRight">
                                                <asp:DropDownList ID="ddlCardExpiryMonth" runat="server">
                                                </asp:DropDownList>
                                                <asp:DropDownList ID="ddlCardExpiryYear" runat="server">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="rfvCardExpiryMonth" ControlToValidate="ddlCardExpiryMonth"
                                                    ErrorMessage="" ValidationGroup="pay" InitialValue="-1" Text="*" runat="server"
                                                    Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RequiredFieldValidator ID="rfvCardExpiryYear" ControlToValidate="ddlCardExpiryYear"
                                                    ErrorMessage="" ValidationGroup="pay" InitialValue="-1" Text="*" runat="server"
                                                    Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:CustomValidator ControlToValidate="txtCCExpiredValid" ValidationGroup="pay"
                                                    ID="csvCCExpiredValid" runat="server" ErrorMessage="<%$ Resources:CarInsurance,CreditCardExpireValication%>"
                                                    Text="" OnServerValidate="csvCCExpiredValid_ServerValidate"></asp:CustomValidator>
                                                <span style="display: none">
                                                    <asp:TextBox ID="txtCCExpiredValid" Text="Valid" runat="server"></asp:TextBox>
                                                </span>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="formRow">
                                            <asp:Label runat="server" ID="Label17" Text="<%$Resources:CarInsurance,CardType%>" />
                                            <div class="formRight">
                                                <asp:DropDownList ID="ddlCardType" runat="server">
                                                    <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                                                    <asp:ListItem Value="Visa" Text="<%$ Resources:CarInsurance,VISA%>"></asp:ListItem>
                                                    <asp:ListItem Value="MasterCard" Text="<%$ Resources:CarInsurance,MasterCard%>"></asp:ListItem>
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="rfvCardType" ControlToValidate="ddlCardType" InitialValue="-1"
                                                    runat="server" ErrorMessage="" Text="*" ValidationGroup="pay"></asp:RequiredFieldValidator>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                        <div class="formRow" id="divCC" runat="server" visible="false">
                                            <asp:Label runat="server" ID="Label23" Text="<%$Resources:CarInsurance,CVV%>" />
                                            <div class="formRight">
                                                <asp:TextBox ID="txtCVV" runat="server" MaxLength="3" Width="40px"></asp:TextBox>
                                                <asp:RequiredFieldValidator ID="rfvCVV" ControlToValidate="txtCVV" ErrorMessage=""
                                                    ValidationGroup="pay" runat="server" Text="*" Display="Dynamic"></asp:RequiredFieldValidator>
                                                <asp:RegularExpressionValidator ID="revCVV" runat="server" ErrorMessage="" ValidationGroup="pay"
                                                    ValidationExpression="[0-9]{3}" ControlToValidate="txtCVV" Text="*" Display="Dynamic"></asp:RegularExpressionValidator>
                                            </div>
                                            <div class="clear">
                                            </div>
                                        </div>
                                    </asp:Panel>
                                </div>
                                <div class="formRow">
                                    <asp:Label runat="server" ID="Label20" Text="<%$Resources:CarInsurance,Amount%>" />
                                    <div class="formRight">
                                        <asp:TextBox ID="txtAmount" runat="server" MaxLength="15" Width="120px"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rfvAmount" ControlToValidate="txtAmount"
                                            ErrorMessage="" Text="*" ValidationGroup="pay" Display="Dynamic"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="revAmount" runat="server" ControlToValidate="txtAmount"
                                            Display="Dynamic" ValidationGroup="pay" ErrorMessage="<%$Resources:General,Notvalid%>"
                                            ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="formRow">
                                    <asp:Label runat="server" ID="Label26" Text="<%$Resources:CarInsurance,PaymentRefNo%>" />
                                    <div class="formRight">
                                        <asp:TextBox ID="txtPaymentRefNo" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ID="rfvPaymentRefNo" ControlToValidate="txtPaymentRefNo"
                                            ErrorMessage="" Text="*" ValidationGroup="pay" Display="Dynamic"></asp:RequiredFieldValidator>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                                <div class="formRow">
                                    <asp:Label runat="server" ID="Label10" Text="" />
                                    <div class="formRight">
                                        <asp:Button ID="btnPaySubmit" runat="server" CausesValidation="true" Text="<%$Resources:General,Submit%>"
                                            ValidationGroup="pay" CssClass="blueB ml10" OnClick="btnPaySubmit_Click" OnClientClick="return SubmitPayConfirm();" />
                                        <asp:Button ID="btnPayDecline" runat="server" CausesValidation="true" Visible="false"
                                            Text="<%$Resources:General,Decline%>" ValidationGroup="pay" CssClass="blueB ml10"
                                            OnClick="btnPayDecline_Click" OnClientClick="return SubmitPayDeclineConfirm();" />
                                        <asp:Button ID="btnPayNew" runat="server" Text="<%$Resources:General,New%>" CssClass="blueB ml10"
                                            OnClick="btnPayNew_Click" />&nbsp;
                                        <asp:Label ID="lblPayError" runat="server" ForeColor="Red" Font-Bold="true"></asp:Label>
                                    </div>
                                    <div class="clear">
                                    </div>
                                </div>
                            </fieldset>
                        </div>
                    </div>
                </asp:Panel>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="upnlApplicationCancel" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlApplicationCancel" runat="server" Visible="false">
                <div class="toggle">
                    <div class="title opened" id="opened3">
                        <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                        <h6>
                            <asp:Label ID="lblApplicationCancel" CssClass="red" runat="server" Text="<%$Resources:CarInsurance,ApplicationCancel %>"></asp:Label>
                        </h6>
                    </div>
                    <div class="form">
                        <fieldset class="step">
                            <div class="formRow">
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="lblRemarks" Text="<%$Resources:CarInsurance,Remarks%>" />
                                <div class="formRight">
                                    <asp:TextBox ID="txtRemark" runat="server" MaxLength="500" Width="400" TextMode="MultiLine"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvRemark" ControlToValidate="txtRemark"
                                        ErrorMessage="<%$Resources:General,RemarksShouldnotbeEmpty%>" Text="<%$Resources:General,RemarksShouldnotbeEmpty%>"
                                        ValidationGroup="appcancel"></asp:RequiredFieldValidator>
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                            <div class="formRow">
                                <asp:Label runat="server" ID="lblAppCan" Text="" />
                                <div class="formRight">
                                    <asp:Button ID="btnApplicationCancel" runat="server" CausesValidation="true" Text="<%$Resources:CarInsurance,ApplicationCancel%>"
                                        ValidationGroup="appcancel" OnClientClick="return SubmitAppCancelConfirm();"
                                        CssClass="blueB ml10" OnClick="btnApplicationCancel_Click" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="upnlApplicationRetrieve" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlApplicationRetrieve" runat="server" Visible="false">
                <div class="toggle">
                    <div class="title opened" id="opened2">
                        <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                        <h6>
                            <asp:Label ID="lblApplicationRetrieve" CssClass="blue" runat="server" Text="<%$Resources:CarInsurance,Retrieve %>"></asp:Label>
                        </h6>
                    </div>
                    <div class="form">
                        <fieldset class="step">
                            <div class="formRow">
                                <asp:Label runat="server" ID="Label15" Text="" />
                                <div class="formRight">
                                    <asp:Button ID="btnApplicationRetrieve" runat="server" CausesValidation="true" Text="<%$Resources:CarInsurance,Retrieve%>"
                                        CssClass="blueB ml10" OnClientClick="return SubmitAppRetrieveConfirm();" OnClick="btnApplicationRetrieve_Click" />
                                </div>
                                <div class="clear">
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlUploadFileList" runat="server" Visible="false">
                <div class="toggle">
                    <div class="title opened" id="opened7">
                        <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                        <h6>
                            <asp:Label ID="Label30" CssClass="blue" runat="server" Text="<%$Resources:General,UploadFileList %>"></asp:Label>
                        </h6>
                    </div>
                    <div id="divFileList" runat="server" visible="false">
                        <asp:GridView ID="grvFileUpload" runat="server" AllowPaging="false" AutoGenerateColumns="False"
                            CssClass="sTable" Width="100%" EmptyDataText="<%$Resources:General,ErrNodata%>"
                            DataKeyNames="FileId,FilePath" GridLines="None" OnRowCommand="grvFileUpload_RowCommand"
                            OnRowDataBound="grvFileUpload_RowDataBound">
                            <Columns>
                                <asp:BoundField DataField="FileType" HeaderText="<%$Resources:CarInsurance,FileUploadType%>"
                                    SortExpression="FileType" ItemStyle-Width="150px" />
                                <asp:BoundField DataField="FileName" HeaderText="<%$Resources:CarInsurance,FileName%>"
                                    SortExpression="FileName" ItemStyle-Width="250px" />
                                <asp:BoundField DataField="OriginalName" HeaderText="<%$Resources:CarInsurance,OriginalName%>"
                                    SortExpression="OriginalName" ItemStyle-Width="350px" />
                                <asp:TemplateField HeaderText="<%$Resources:General,DownlaodPDF%>">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="hplDownLoad" runat="server" Text="<%$Resources:General,DownlaodPDF%>"
                                            Target="_blank"></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$Resources:General,DownlaodPDF%>" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lblPath" runat="server" Text='<%# Eval("FilePath").ToString() %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="<%$Resources:CarInsurance,Delete%>">
                                    <ItemTemplate>
                                        <asp:Button runat="server" ID="btnDelete" Text="<%$Resources:CarInsurance,Delete%>"
                                            CommandName="MyDelete" CommandArgument='<%#Eval("FileId")%>' OnClientClick="javascript:return SubmitFileDeleteConfirm();"
                                            CssClass="blueB ml10" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle />
                            <PagerStyle />
                            <SelectedRowStyle />
                            <HeaderStyle />
                            <EditRowStyle />
                            <AlternatingRowStyle />
                            <RowStyle />
                        </asp:GridView>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:Panel ID="pnlUpload" runat="server">
        <div id="divUpload" style="display: none;">
            <div class="toggle">
                <div class="title opened" id="opened5">
                    <img src="../../images/icons/dark/clipboard.png" alt="" class="titleIcon" />
                    <h6>
                        <asp:Label ID="Label24" CssClass="blue" runat="server" Text="<%$Resources:General,UploadFile %>"></asp:Label>
                    </h6>
                </div>
                <div class="form">
                    <fieldset class="step">
                        <div class="formRow">
                            <asp:Label runat="server" ID="Label27" Text="<%$Resources:Carinsurance,FileUploadType%>" />
                            <div class="formRight">
                                <asp:DropDownList ID="ddlFileUploadType" runat="server" Width="200px">
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="rfvFileUploadType" ControlToValidate="ddlFileUploadType"
                                    ErrorMessage="" ValidationGroup="upload" InitialValue="-1" Text="*" runat="server"></asp:RequiredFieldValidator>
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="formRow">
                            <asp:Label runat="server" ID="lblChooseDoc" Text="<%$Resources:General,ChooseDocument%>" />
                            <div class="formRight">
                                <asp:FileUpload ID="FileUpLoad1" runat="server" /><span id="Span1" runat="server"
                                    style="color: Red"></span>
                                
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="formRow">
                            <asp:Label runat="server" ID="Label28" Text="" />
                            <div class="formRight">
                                <asp:Button ID="btnUpload" Text="<%$Resources:General,UploadFile%>" OnClick="btnUpload_Click"
                                    runat="server" CssClass="blueB ml10" OnClientClick="return SubmitUploadwithIdConfirm();"
                                    ValidationGroup="upload" />
                            </div>
                            <div class="clear">
                            </div>
                        </div>
                    </fieldset>
                </div>
            </div>
        </div>
    </asp:Panel>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Panel ID="pnlCarDetails" runat="server" Visible="false">
                <div class="toggle">
                    <div class="title opened" id="opened6">
                        <img src="../../images/icons/dark/car.png" alt="" class="titleIcon" />
                        <h6>
                            <asp:Label ID="Label12" runat="server" Text="<%$Resources:CarInsurance,CarInsuranceDetails%>" />
                            &nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="lblLastUpdate" runat="server" Text="" Font-Bold="true"
                                ForeColor="Red" />
                        </h6>
                    </div>
                    <div class="form">
                        <table cellpadding="0" cellspacing="0" border="0" width="100%" class="sTable">
                            <tr>
                                <td colspan="4">
                                    <asp:ValidationSummary HeaderText="Opps..,please complete all(*) fields." runat="server"
                                        ValidationGroup="nongg" ID="vsNonGG" ShowMessageBox="false" ShowSummary="true" />
                                </td>
                            </tr>
                            <tr>
                                <%--<tr id="trRenewal" runat="server" visible="false">--%>
                                <td width="180">
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "ApplicationType")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlApplicationType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlApplicationType_SelectedIndexChanged">
                                        <asp:ListItem Value="NEW" Text="<%$ Resources:Proposal,AppTypeNew%>"></asp:ListItem>
                                        <asp:ListItem Value="REN" Text="<%$ Resources:Proposal,AppTypeRenewal%>"></asp:ListItem>
                                        <asp:ListItem Value="CHB" Text="<%$ Resources:Proposal,AppTypeChangeBroker%>"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td width="180">
                                    <asp:Label runat="server" ID="lblLastYearPolicyNoTitle"></asp:Label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtLastYearPolicyNo" runat="server" MaxLength="25" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvLastYearPolicyNo" ControlToValidate="txtLastYearPolicyNo"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <div style="display: none;">
                                        <asp:TextBox ID="txtLastYearRefNo" runat="server" ReadOnly="true" Width="160px"></asp:TextBox></div>
                                </td>
                            </tr>
                            <tr>
                                <td width="180">
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "InsuranceType")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlInsuranceType" runat="server" Width="165px">
                                    </asp:DropDownList>
                                </td>
                                <td width="180">
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "ApplicationDate")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlApplicationDay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlApplicationMonth" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlApplicationYear" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "TypeofVehicle")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlVehicleType" runat="server" Width="165px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CarYear")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCarModelYear" runat="server" MaxLength="4" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCarModelYear" ControlToValidate="txtCarModelYear"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revCarModelYear" runat="server" ControlToValidate="txtCarModelYear"
                                        Display="Dynamic" ValidationGroup="nongg" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\[0-9])?$"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "GarageType")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlGarageType2" runat="server" Width="165px">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CarModel")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCarMakeModel" runat="server" MaxLength="100" Width="275px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCarMakeModel" ControlToValidate="txtCarMakeModel"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "PolicyStartDate_Voluntary")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlCommenceDay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlCommenceMonth" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlCommenceYear" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CurrentInsurer")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCurrentInsurer" runat="server" MaxLength="100" Width="275px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCurrentInsurer" ControlToValidate="txtCurrentInsurer"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "SumInsured")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtSumInsured" runat="server" MaxLength="15" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvSumInsured" ControlToValidate="txtSumInsured"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revSumInsured" runat="server" ControlToValidate="txtSumInsured"
                                        Display="Dynamic" ValidationGroup="nongg" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "EngineNumber")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtEngineNumber" runat="server" MaxLength="50" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvEngineNumber" ControlToValidate="txtEngineNumber"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "InsurancePremium")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtInsurancePremium" runat="server" MaxLength="15" Width="160px"
                                        ReadOnly="true"></asp:TextBox>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "ChassisNumber")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtChassisNumber" runat="server" MaxLength="50" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvChassisNumber" ControlToValidate="txtChassisNumber"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "PolicyStartDate_Compulsory")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlPolicyDay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlPolicyMonth" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlPolicyYear" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "PlateNumber")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtPlateNumber" runat="server" MaxLength="15" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvPlateNumber" ControlToValidate="txtPlateNumber"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CompulsoryInsurance")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlCTPL" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCTPL_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Text="<%$ Resources:Proposal,No%>"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="<%$ Resources:Proposal,Yes%>"></asp:ListItem>
                                    </asp:DropDownList>
                                    &nbsp;
                                    <asp:TextBox ID="txtCTPL" runat="server" MaxLength="15" Width="100px" ReadOnly="true"></asp:TextBox>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "RegistrationProvince")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtRegistrationProvince" runat="server" MaxLength="75" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvRegistrationProvince" ControlToValidate="txtRegistrationProvince"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("General", "AnnualPremium")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtTotalPremium" runat="server" MaxLength="15" Width="160px" ReadOnly="true"></asp:TextBox>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "NCB")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlNCB" runat="server" Width="50px">
                                        <asp:ListItem Value="0" Text="0"></asp:ListItem>
                                        <asp:ListItem Value="10" Text="10"></asp:ListItem>
                                        <asp:ListItem Value="20" Text="20"></asp:ListItem>
                                        <asp:ListItem Value="30" Text="30"></asp:ListItem>
                                        <asp:ListItem Value="40" Text="40"></asp:ListItem>
                                        <asp:ListItem Value="50" Text="50"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "TotalFinalPremium")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCollectedAmount" ReadOnly="true" runat="server" MaxLength="15"
                                        Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCollectedAmount" ControlToValidate="txtCollectedAmount"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revCollectedAmount" runat="server" ControlToValidate="txtCollectedAmount"
                                        Display="Dynamic" ValidationGroup="nongg" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\.[0-9]{1,2})?$"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("CarInsurance", "BalanceAmount")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:Label ID="lblBalanceAmount" runat="server" Font-Bold="true"></asp:Label>
                                </td>
                            </tr>
                            <!--Insurer -->
                            <tr>
                                <td colspan="4">
                                    <h6>
                                        <%=GetGlobalResourceObject("Proposal", "InsuredPerson")%>
                                    </h6>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CustomerType")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlCustomerType" runat="server" Width="165px">
                                        <asp:ListItem Value="INDI" Text="<%$ Resources:Proposal,Individual%>"></asp:ListItem>
                                        <asp:ListItem Value="CORP" Text="<%$ Resources:Proposal,Corporate%>"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Prefix")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtPrefix" runat="server" MaxLength="20" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvPrefix" ControlToValidate="txtPrefix"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "DOB")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDOBDay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDOBMonth" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDOBYear" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Beneficiary")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtBeneficiary" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvBeneficiary" ControlToValidate="txtBeneficiary"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revBeneficiary" runat="server" ControlToValidate="txtBeneficiary"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="nongg"
                                        ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Gender")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlGender" runat="server">
                                        <asp:ListItem Value="M" Text="<%$ Resources:Proposal,Male%>"></asp:ListItem>
                                        <asp:ListItem Value="F" Text="<%$ Resources:Proposal,Female%>"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CustomerName")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCustomerName" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCustomerName" ControlToValidate="txtCustomerName"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revCustomerName" runat="server" ControlToValidate="txtCustomerName"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="nongg"
                                        ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Occupation")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlOccupation" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "RegisteredOwner")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtInsuredPerson" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvInsuredPerson" ControlToValidate="txtInsuredPerson"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revInsuredPerson" runat="server" ControlToValidate="txtInsuredPerson"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="nongg"
                                        ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "InsuranceCompany")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtInsuranceCompany" runat="server" MaxLength="100" Width="250px"
                                        ReadOnly="true"></asp:TextBox>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "CurrentAddress")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtCurrentAddress" runat="server" MaxLength="100" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvCurrentAddress" ControlToValidate="txtCurrentAddress"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Package")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtPackage" runat="server" MaxLength="100" Width="250px"></asp:TextBox>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "DistrictSub")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtSubDistrict" runat="server" MaxLength="100" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvSubDistrict" ControlToValidate="txtSubDistrict"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "QuoteReferenceNumber")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtNewQuoteRefNo" runat="server" MaxLength="50" Width="160px" ReadOnly="true"></asp:TextBox>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "StateProvince")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtStateProvince" runat="server" MaxLength="100" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvStateProvince" ControlToValidate="txtStateProvince"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "ContactNo")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtContactNumber" runat="server" MaxLength="15" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvContactNumber" ControlToValidate="txtContactNumber"
                                        Display="Dynamic" ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revContactNumber" runat="server" ControlToValidate="txtContactNumber"
                                        Display="Dynamic" ValidationGroup="nongg" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\[0-9])?$"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Province")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtProvince" runat="server" MaxLength="100" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvProvince" ControlToValidate="txtProvince"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "NamedDriver")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlNamedDriver" runat="server" Width="50px" AutoPostBack="true"
                                        OnSelectedIndexChanged="ddlNamedDriver_SelectedIndexChanged">
                                        <asp:ListItem Value="0" Selected="True">0</asp:ListItem>
                                        <asp:ListItem Value="1">1</asp:ListItem>
                                        <asp:ListItem Value="2">2</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "PostalCode")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtPostalCode" runat="server" MaxLength="5" Width="160px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvPostalCode" ControlToValidate="txtPostalCode"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revPostalCode" runat="server" ControlToValidate="txtPostalCode"
                                        Display="Dynamic" ValidationGroup="nongg" ErrorMessage="<%$Resources:General,Notvalid%>"
                                        ValidationExpression="^[0-9]+(\[0-9])?$"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <!--Named Driver -->
                            <tr>
                                <td colspan="4">
                                    <h6>
                                        <%=GetGlobalResourceObject("Proposal", "NamedDriver")%>
                                    </h6>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "DriverFirstDOB")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDriver1DOBDay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDriver1DOBMonth" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDriver1DOBYear" runat="server">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "DriverTwoDOB")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:DropDownList ID="ddlDriver2DOBDay" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDriver2DOBMonth" runat="server">
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlDriver2DOBYear" runat="server">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "DriverFirst")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDriverFirst" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDriverFirst" ControlToValidate="txtDriverFirst"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revDriverFirst" runat="server" ControlToValidate="txtDriverFirst"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="nongg"
                                        ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "DriverTwo")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDriverTwo" runat="server" MaxLength="50" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDriverTwo" ControlToValidate="txtDriverTwo"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revDriverTwo" runat="server" ControlToValidate="txtDriverTwo"
                                        ValidationExpression="^([\u0000-\uDFFF']{1,50})$|^([a-zA-Z''-'\s]{1,50})$" ValidationGroup="nongg"
                                        ErrorMessage="" Text="*"></asp:RegularExpressionValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Driver1IDNo")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDriver1IDNo" runat="server" MaxLength="13" Width="150px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDriver1IDNo" ControlToValidate="txtDriver1IDNo"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Driver2IDNo")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDriver2IDNo" runat="server" MaxLength="13" Width="150px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDriver2IDNo" ControlToValidate="txtDriver2IDNo"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Driver1LicenseNo")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDriver1LicenseNo" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDriver1LicenseNo" ControlToValidate="txtDriver1LicenseNo"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                                <td>
                                    <label>
                                        <%=GetGlobalResourceObject("Proposal", "Driver2LicenseNo")%>
                                    </label>
                                </td>
                                <td align="left">
                                    <asp:TextBox ID="txtDriver2LicenseNo" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                                    <asp:RequiredFieldValidator runat="server" ID="rfvDriver2LicenseNo" ControlToValidate="txtDriver2LicenseNo"
                                        ErrorMessage="" Text="*" ValidationGroup="nongg"></asp:RequiredFieldValidator>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <div class="wizButtons">
                                        <span class="wNavButtons">
                                            <asp:Button ID="btnSubmit" runat="server" Width="100px" OnClick="btnSubmit_Click"
                                                ValidationGroup="nongg" CssClass="blueB ml10" Text="<%$Resources:General,Submit%>"
                                                OnClientClick="return SubmitConfirm();" />
                                        </span>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </asp:Panel>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnSubmit" />
        </Triggers>
    </asp:UpdatePanel>
    <div class="clear">
    </div>

    <script type="text/javascript">
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);
        var postBackElement;
        function InitializeRequest(sender, args) {
            if (prm.get_isInAsyncPostBack())
                args.set_cancel(true);
            postBackElement = args.get_postBackElement();
            OnOffUpdateProgress(true);
        }
        var bUpdateStatus = true;
        function OnOffUpdateProgress(onOff) {
            if ($get('<%=ddlOption.ClientID%>') != null) {
                $get('<%=ddlOption.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnAppSummary.ClientID%>') != null) {
                $get('<%=btnAppSummary.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnSearch.ClientID%>') != null) {
                $get('<%=btnSearch.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnSubmit.ClientID%>') != null) {
                $get('<%=btnSubmit.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnPaySubmit.ClientID%>') != null) {
                $get('<%=btnPaySubmit.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnPayNew.ClientID%>') != null) {
                $get('<%=btnPayNew.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnPayDecline.ClientID%>') != null) {
                $get('<%=btnPayDecline.ClientID%>').disabled = onOff;
            }
            if ($get('<%=btnOnlinePaySubmit.ClientID%>') != null) {
                $get('<%=btnOnlinePaySubmit.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnOnlinePayDecline.ClientID%>') != null) {
                $get('<%=btnOnlinePayDecline.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnApplicationCancel.ClientID%>') != null) {
                bUpdateStatus = $get('<%=btnApplicationCancel.ClientID%>').disabled;
                $get('<%=btnApplicationCancel.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnApplicationRetrieve.ClientID%>') != null) {
                $get('<%=btnApplicationRetrieve.ClientID%>').disabled = onOff;
            }

            if ($get('<%=btnUpload.ClientID%>') != null) {
                $get('<%=btnUpload.ClientID%>').disabled = onOff;
            }

            if ($get('<%=grvPayment.ClientID%>') != null) {
                $get('<%=grvPayment.ClientID%>').disabled = onOff;
            }

            if ($get('<%=grvFileUpload.ClientID%>') != null) {
                $get('<%=grvFileUpload.ClientID%>').disabled = onOff;
            }

            if ($get('<%=lblLoadMessage.ClientID%>') != null) {
                if (onOff) {
                    $get('<%=lblLoadMessage.ClientID%>').innerHTML = 'Processing... please wait';
                }
            }

            if ($get('<%=lblOptionMessage.ClientID%>') != null) {
                if (onOff) {
                    $get('<%=lblOptionMessage.ClientID%>').innerHTML = '';
                }
            }

        }

        function EndRequest(sender, args) {
            OnOffUpdateProgress(false);
            if ($get('<%=btnApplicationCancel.ClientID%>') != null) {
                $get('<%=btnApplicationCancel.ClientID%>').disabled = bUpdateStatus;
            }
        }


        function SubmitConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('nongg')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitContinueConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('continue')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitiPayConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('ipay')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitAppCancelConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('appcancel')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitAppRetrieveConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            return _retVal;
        }

        function SubmitUploadConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            return _retVal;
        }

        function SubmitUploadwithIdConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('upload')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitSearchConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('search')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSearch")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitFileDeleteConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmDeleteTheFile")%>');
            return _retVal;
        }

        function SubmitPayConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('pay')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitOnlinePayConfirm() {
            var _retVal = false;
            if (Page_ClientValidate('olpay')) {
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmSubmit")%>');
            }
            else {
                ShowDiv();
            }
            return _retVal;
        }

        function SubmitOnlinePayDeclineConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmDeclineOnlinePayment")%>');
            return _retVal;
        }

        function SubmitPayDeclineConfirm() {
            var _retVal = false;
            _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmDeclinePayment")%>');
            return _retVal;
        }

        function CheckPaymentType() {
            var _optRefund = document.getElementById('<%=chkRefund.ClientID%>');
            if (_optRefund.checked) {
                //alert(1);
                ShowHide('divCredit', false);
                ValidatorEnable(document.getElementById('<%=rfvPaymentType.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvPaymentOption.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardHolder.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvIssuingBank.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardNo1.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=revCardNo1.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardNo2.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=revCardNo2.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardNo3.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=revCardNo3.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardNo4.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=revCardNo4.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardExpiryMonth.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardExpiryYear.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=csvCCExpiredValid.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCardType.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=rfvCVV.ClientID%>'), false);
                ValidatorEnable(document.getElementById('<%=revCVV.ClientID%>'), false);
            }
            else {
                //alert(2);
                ShowHide('divCredit', true);
                ValidatorEnable(document.getElementById('<%=rfvPaymentType.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvPaymentOption.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardHolder.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvIssuingBank.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardNo1.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=revCardNo1.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardNo2.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=revCardNo2.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardNo3.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=revCardNo3.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardNo4.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=revCardNo4.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardExpiryMonth.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardExpiryYear.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=csvCCExpiredValid.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCardType.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=rfvCVV.ClientID%>'), true);
                ValidatorEnable(document.getElementById('<%=revCVV.ClientID%>'), true);
            }
        }

        function ShowHideDiv(divName, varOnOff) {
            // alert(divName + varOnOff);
            if (varOnOff) {
                document.getElementById(divName).style.display = "";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }
        }

        function ShowHide(divName, varOnOff) {
            if (varOnOff) {
                document.getElementById(divName).style.display = "block";
            }
            else {
                document.getElementById(divName).style.display = "none";
            }
        }
        
    </script>

</asp:Content>
